package com.beyond.trace.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * 消耗品信息对象 t_trace_consumable
 * 
 * @author yao
 * @date 2022-03-02
 */
@Data
@TableName("t_trace_consumable")
public class TraceConsumable extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "consumable_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long consumableId;

    /** 消耗品编码 */
    @Excel(name = "消耗品编码")
    @ApiModelProperty(value = "消耗品编码")
    private String consumableNo;

    /** 消耗品名称 */
    @Excel(name = "消耗品名称")
    @ApiModelProperty(value = "消耗品名称")
    @NotEmpty(message = "名称不能为空")
    private String consumableName;

    /** 消耗品规格型号 */
    @Excel(name = "消耗品规格型号")
    @ApiModelProperty(value = "消耗品规格型号")
    private String consumableSize;

    /** 属性 */
    @Excel(name = "属性")
    @ApiModelProperty(value = "属性")
    private String consumableType;

    /** 单位 */
    @Excel(name = "单位")
    @ApiModelProperty(value = "单位")
    private String consumableUnit;

    /** 入库数量 */
    @Excel(name = "入库数量")
    @ApiModelProperty(value = "入库数量")
    @Size(min = 0,max = 15,message = "入库数量不能超过15个字符")
    private String consumableReceiveCount;

    /** 入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "入库时间")
    private Date consumableReceiveTime;

    /** 库存数量 */
    @Excel(name = "库存数量")
    @ApiModelProperty(value = "库存数量")
    @Size(min = 0,max = 15,message = "库存数量不能超过15个字符")
    private String consumableStoreCount;

    /** 仓库名称 */
    @Excel(name = "仓库名称")
    @ApiModelProperty(value = "仓库名称")
    private String consumableStore;

    /** 操作人 */
    @Excel(name = "操作人")
    @ApiModelProperty(value = "操作人")
    private String consumablePerson;

    /** 操作人联系方式 */
    @Excel(name = "操作人联系方式")
    @ApiModelProperty(value = "操作人联系方式")
    private String consumablePersonPhone;

    @Excel(name = "部门id")
    @ApiModelProperty(value = "部门id")
    @JsonIgnore
    private String departId;

    public void setConsumableId(Long consumableId) 
    {
        this.consumableId = consumableId;
    }

    public Long getConsumableId() 
    {
        return consumableId;
    }
    public void setConsumableName(String consumableName) 
    {
        this.consumableName = consumableName;
    }

    public String getConsumableName() 
    {
        return consumableName;
    }
    public void setConsumableSize(String consumableSize) 
    {
        this.consumableSize = consumableSize;
    }

    public String getConsumableSize() 
    {
        return consumableSize;
    }
    public void setConsumableType(String consumableType)
    {
        this.consumableType = consumableType;
    }

    public String getConsumableType()
    {
        return consumableType;
    }
    public void setConsumableUnit(String consumableUnit)
    {
        this.consumableUnit = consumableUnit;
    }

    public String getConsumableUnit()
    {
        return consumableUnit;
    }
    public void setConsumableReceiveCount(String consumableReceiveCount)
    {
        this.consumableReceiveCount = consumableReceiveCount;
    }

    public String getConsumableReceiveCount()
    {
        return consumableReceiveCount;
    }
    public void setConsumableReceiveTime(Date consumableReceiveTime) 
    {
        this.consumableReceiveTime = consumableReceiveTime;
    }

    public Date getConsumableReceiveTime() 
    {
        return consumableReceiveTime;
    }
    public void setConsumableStoreCount(String consumableStoreCount)
    {
        this.consumableStoreCount = consumableStoreCount;
    }

    public String getConsumableStoreCount()
    {
        return consumableStoreCount;
    }
    public void setConsumableStore(String consumableStore) 
    {
        this.consumableStore = consumableStore;
    }

    public String getConsumableStore() 
    {
        return consumableStore;
    }
    public void setConsumablePerson(String consumablePerson) 
    {
        this.consumablePerson = consumablePerson;
    }

    public String getConsumablePerson() 
    {
        return consumablePerson;
    }
    public void setConsumablePersonPhone(String consumablePersonPhone) 
    {
        this.consumablePersonPhone = consumablePersonPhone;
    }

    public String getConsumablePersonPhone() 
    {
        return consumablePersonPhone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("consumableId", getConsumableId())
            .append("consumableName", getConsumableName())
            .append("consumableSize", getConsumableSize())
            .append("consumableType", getConsumableType())
            .append("consumableUnit", getConsumableUnit())
            .append("consumableReceiveCount", getConsumableReceiveCount())
            .append("consumableReceiveTime", getConsumableReceiveTime())
            .append("consumableStoreCount", getConsumableStoreCount())
            .append("consumableStore", getConsumableStore())
            .append("consumablePerson", getConsumablePerson())
            .append("consumablePersonPhone", getConsumablePersonPhone())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
